import Mock from 'mockjs';
import loginApis from "@/url/logReg"

const login = loginApis.login

export default [
  { // 登录
    url: login.url,
    method: login.method,
    response: (cfg: any) => {
      if(cfg.body.userId === 'sdfsdf' && cfg.body.password === 'sdfsdf') {
        return {
          code: 200,
          data: {
            url: login.url,
            data: {
              cfg:cfg
            },
          },
          message: 'success',
        }
      } else {
        return {
          code: 200,
          data: {
            url: login.url,
            data: {
              cfg:{
                other: 'other'
              }
            },
          },
          message: 'success',
        }
      }

    }
  }
]